package com.bianmaba.spring.supports.data.beans.basc;


import org.springframework.data.domain.PageImpl;

public class PageableResult extends Result {
    private PageImpl page;

    public PageableResult(PageImpl data) {
        super(data);
        this.success = true;
        this.page = data;
    }

    public long getTotal() {
        return page.getTotalElements();
    }

    public Object getData() {
        return page.getContent();
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public boolean isSuccess() {
        return success;
    }
}